using System;
using System.Data;
using System.Collections.Generic;
using Soccer.Core;
using Soccer.Utility;

namespace Soccer.Business
{
    [TableAttribute("Clubs")]
	[Serializable]
    public class Club : DBO<Club>
    {
		#region Fields
		
		private int? _IdClub;
		private string _ClubName;
		private int? _IdCountry;
		private string _Province;
		private string _StadiumName;
		private int? _EstablishYear;
		private int? _Capacity;
		private string _ChairmanName;
		private int? _Rate;
		private string _Address;
		private string _Phone;
		private string _Website;
		private string _LogoClub;
		private string _ClotheImage;
		
		#endregion
		
		#region Constructors
		/// <summary>
		/// Default constructor
		/// </summary>
		public Club()
		{
			
		}
		
		/// <summary>
		/// Constructor with IdClub 
		/// </summary>
		/// <param name="IdClub">The IdClub</param>
		public Club(int? IdClub )
		{
			this.IdClub = IdClub;
		}
		
		/// <summary>
		/// Constructor with all parameters
		/// </summary>
		/// <param name="IdClub">Sets int? value for IdClub</param>
		/// <param name="ClubName">Sets string value for ClubName</param>
		/// <param name="IdCountry">Sets int? value for IdCountry</param>
		/// <param name="Province">Sets string value for Province</param>
		/// <param name="StadiumName">Sets string value for StadiumName</param>
		/// <param name="EstablishYear">Sets int? value for EstablishYear</param>
		/// <param name="Capacity">Sets int? value for Capacity</param>
		/// <param name="ChairmanName">Sets string value for ChairmanName</param>
		/// <param name="Rate">Sets int? value for Rate</param>
		/// <param name="Address">Sets string value for Address</param>
		/// <param name="Phone">Sets string value for Phone</param>
		/// <param name="Website">Sets string value for Website</param>
		/// <param name="LogoClub">Sets string value for LogoClub</param>
		/// <param name="ClotheImage">Sets string value for ClotheImage</param>
		public Club(int? idClub, string clubName, int? idCountry, string province, string stadiumName, int? establishYear, int? capacity, string chairmanName, int? rate, string address, string phone, string website, string logoClub, string clotheImage)
		{
			this.IdClub = idClub;
			this.ClubName = clubName;
			this.IdCountry = idCountry;
			this.Province = province;
			this.StadiumName = stadiumName;
			this.EstablishYear = establishYear;
			this.Capacity = capacity;
			this.ChairmanName = chairmanName;
			this.Rate = rate;
			this.Address = address;
			this.Phone = phone;
			this.Website = website;
			this.LogoClub = logoClub;
			this.ClotheImage = clotheImage;
		}
		
		#endregion
		
		#region Properties
		
		/// <summary>
		/// Gets or sets int? value for IdClub
		/// </summary>
		[ColumnAttribute("IdClub", SqlDbType.Int , 4 , true, true, false)]
		public int? IdClub
		{
			set
			{
				this._IdClub = value;
			}
			get
			{
				return this._IdClub;
			}
		}
		
		/// <summary>
		/// Gets or sets string value for ClubName
		/// </summary>
		[ColumnAttribute("ClubName", SqlDbType.NVarChar , 100 , false, false, true)]
		public string ClubName
		{
			set
			{
				this._ClubName = value;
			}
			get
			{
				return this._ClubName;
			}
		}
		
		/// <summary>
		/// Gets or sets int? value for IdCountry
		/// </summary>
		[ColumnAttribute("IdCountry", SqlDbType.Int , 4 , false, false, true)]
		public int? IdCountry
		{
			set
			{
				this._IdCountry = value;
			}
			get
			{
				return this._IdCountry;
			}
		}
		
		/// <summary>
		/// Gets or sets string value for Province
		/// </summary>
		[ColumnAttribute("Province", SqlDbType.NVarChar , 100 , false, false, true)]
		public string Province
		{
			set
			{
				this._Province = value;
			}
			get
			{
				return this._Province;
			}
		}
		
		/// <summary>
		/// Gets or sets string value for StadiumName
		/// </summary>
		[ColumnAttribute("StadiumName", SqlDbType.NVarChar , 100 , false, false, true)]
		public string StadiumName
		{
			set
			{
				this._StadiumName = value;
			}
			get
			{
				return this._StadiumName;
			}
		}
		
		/// <summary>
		/// Gets or sets int? value for EstablishYear
		/// </summary>
		[ColumnAttribute("EstablishYear", SqlDbType.Int , 4 , false, false, true)]
		public int? EstablishYear
		{
			set
			{
				this._EstablishYear = value;
			}
			get
			{
				return this._EstablishYear;
			}
		}
		
		/// <summary>
		/// Gets or sets int? value for Capacity
		/// </summary>
		[ColumnAttribute("Capacity", SqlDbType.Int , 4 , false, false, true)]
		public int? Capacity
		{
			set
			{
				this._Capacity = value;
			}
			get
			{
				return this._Capacity;
			}
		}
		
		/// <summary>
		/// Gets or sets string value for ChairmanName
		/// </summary>
		[ColumnAttribute("ChairmanName", SqlDbType.NVarChar , 100 , false, false, true)]
		public string ChairmanName
		{
			set
			{
				this._ChairmanName = value;
			}
			get
			{
				return this._ChairmanName;
			}
		}
		
		/// <summary>
		/// Gets or sets int? value for Rate
		/// </summary>
		[ColumnAttribute("Rate", SqlDbType.Int , 4 , false, false, true)]
		public int? Rate
		{
			set
			{
				this._Rate = value;
			}
			get
			{
				return this._Rate;
			}
		}
		
		/// <summary>
		/// Gets or sets string value for Address
		/// </summary>
		[ColumnAttribute("Address", SqlDbType.NVarChar , 1000 , false, false, true)]
		public string Address
		{
			set
			{
				this._Address = value;
			}
			get
			{
				return this._Address;
			}
		}
		
		/// <summary>
		/// Gets or sets string value for Phone
		/// </summary>
		[ColumnAttribute("Phone", SqlDbType.NVarChar , 50 , false, false, true)]
		public string Phone
		{
			set
			{
				this._Phone = value;
			}
			get
			{
				return this._Phone;
			}
		}
		
		/// <summary>
		/// Gets or sets string value for Website
		/// </summary>
		[ColumnAttribute("Website", SqlDbType.NVarChar , 300 , false, false, true)]
		public string Website
		{
			set
			{
				this._Website = value;
			}
			get
			{
				return this._Website;
			}
		}
		
		/// <summary>
		/// Gets or sets string value for LogoClub
		/// </summary>
		[ColumnAttribute("LogoClub", SqlDbType.NVarChar , 100 , false, false, true)]
		public string LogoClub
		{
			set
			{
				this._LogoClub = value;
			}
			get
			{
				return this._LogoClub;
			}
		}
		
		/// <summary>
		/// Gets or sets string value for ClotheImage
		/// </summary>
		[ColumnAttribute("ClotheImage", SqlDbType.NVarChar , 100 , false, false, true)]
		public string ClotheImage
		{
			set
			{
				this._ClotheImage = value;
			}
			get
			{
				return this._ClotheImage;
			}
		}
		
		
		/// <summary>
		/// Get a list Card of current Club object base on IdClub
		/// </summary>
		public List<Card> CardListForIdClub
		{
			get
			{
				if (this.IdClub == null)
					return null;
				Card condition = new Card();
				condition.IdClub = this.IdClub;
				return CardController.FindItems(condition);
			}
		}
		
		/// <summary>
		/// Get a list ClubSeason of current Club object base on IdClub
		/// </summary>
		public List<ClubSeason> ClubSeasonListForIdClub
		{
			get
			{
				if (this.IdClub == null)
					return null;
				ClubSeason condition = new ClubSeason();
				condition.IdClub = this.IdClub;
				return ClubSeasonController.FindItems(condition);
			}
		}
		
		/// <summary>
		/// Get a list Goal of current Club object base on IdClub
		/// </summary>
		public List<Goal> GoalListForIdClub
		{
			get
			{
				if (this.IdClub == null)
					return null;
				Goal condition = new Goal();
				condition.IdClub = this.IdClub;
				return GoalController.FindItems(condition);
			}
		}
		
		/// <summary>
		/// Get a list Match of current Club object base on IdClub
		/// </summary>
		public List<Match> MatchListForIdClubHome
		{
			get
			{
				if (this.IdClub == null)
					return null;
				Match condition = new Match();
				condition.IdClubHome = this.IdClub;
				return MatchController.FindItems(condition);
			}
		}
		
		/// <summary>
		/// Get a list Match of current Club object base on IdClub
		/// </summary>
		public List<Match> MatchListForIdClubVisitor
		{
			get
			{
				if (this.IdClub == null)
					return null;
				Match condition = new Match();
				condition.IdClubVisitor = this.IdClub;
				return MatchController.FindItems(condition);
			}
		}
		
		/// <summary>
		/// Get a list PlayerClubCurrent of current Club object base on IdClub
		/// </summary>
		public List<PlayerClubCurrent> PlayerClubCurrentListForIdClub
		{
			get
			{
				if (this.IdClub == null)
					return null;
				PlayerClubCurrent condition = new PlayerClubCurrent();
				condition.IdClub = this.IdClub;
				return PlayerClubCurrentController.FindItems(condition);
			}
		}
		
		/// <summary>
		/// Get a list PlayerClubHistory of current Club object base on IdClub
		/// </summary>
		public List<PlayerClubHistory> PlayerClubHistoryListForIdClub
		{
			get
			{
				if (this.IdClub == null)
					return null;
				PlayerClubHistory condition = new PlayerClubHistory();
				condition.IdClub = this.IdClub;
				return PlayerClubHistoryController.FindItems(condition);
			}
		}
		
		/// <summary>
		/// Get a list Transfer of current Club object base on IdClub
		/// </summary>
		public List<Transfer> TransferListForIdClubFrom
		{
			get
			{
				if (this.IdClub == null)
					return null;
				Transfer condition = new Transfer();
				condition.IdClubFrom = this.IdClub;
				return TransferController.FindItems(condition);
			}
		}
		
		/// <summary>
		/// Get a list Transfer of current Club object base on IdClub
		/// </summary>
		public List<Transfer> TransferListForIdClubTo
		{
			get
			{
				if (this.IdClub == null)
					return null;
				Transfer condition = new Transfer();
				condition.IdClubTo = this.IdClub;
				return TransferController.FindItems(condition);
			}
		}
		
		/// <summary>
		/// Get a Country of current Club object base on IdCountry
		/// </summary>
		public Country Country
		{
			get
			{
				if (this.IdCountry == null)
					return null;
	
				Country condition = new Country(this.IdCountry);
				return CountryController.FindItem(condition);
			}
		}
		
		#endregion
        
        #region Other Properties
        private static ColumnNameStruct? _ColumnName;
        public static ColumnNameStruct ColumnName
        {
            get
            {
                if (!_ColumnName.HasValue)
                    _ColumnName = new ColumnNameStruct();
                return _ColumnName.Value;
            }
        }
        #endregion

        #region NestedType
        public  struct ColumnNameStruct
        {
            /// <summary>
            /// Get the name of column [IdClub]
            /// </summary>
            public string IdClub
            {
                get
                {
                    return "IdClub";
                }
            }
            /// <summary>
            /// Get the name of column [ClubName]
            /// </summary>
            public string ClubName
            {
                get
                {
                    return "ClubName";
                }
            }
            /// <summary>
            /// Get the name of column [IdCountry]
            /// </summary>
            public string IdCountry
            {
                get
                {
                    return "IdCountry";
                }
            }
            /// <summary>
            /// Get the name of column [Province]
            /// </summary>
            public string Province
            {
                get
                {
                    return "Province";
                }
            }
            /// <summary>
            /// Get the name of column [StadiumName]
            /// </summary>
            public string StadiumName
            {
                get
                {
                    return "StadiumName";
                }
            }
            /// <summary>
            /// Get the name of column [EstablishYear]
            /// </summary>
            public string EstablishYear
            {
                get
                {
                    return "EstablishYear";
                }
            }
            /// <summary>
            /// Get the name of column [Capacity]
            /// </summary>
            public string Capacity
            {
                get
                {
                    return "Capacity";
                }
            }
            /// <summary>
            /// Get the name of column [ChairmanName]
            /// </summary>
            public string ChairmanName
            {
                get
                {
                    return "ChairmanName";
                }
            }
            /// <summary>
            /// Get the name of column [Rate]
            /// </summary>
            public string Rate
            {
                get
                {
                    return "Rate";
                }
            }
            /// <summary>
            /// Get the name of column [Address]
            /// </summary>
            public string Address
            {
                get
                {
                    return "Address";
                }
            }
            /// <summary>
            /// Get the name of column [Phone]
            /// </summary>
            public string Phone
            {
                get
                {
                    return "Phone";
                }
            }
            /// <summary>
            /// Get the name of column [Website]
            /// </summary>
            public string Website
            {
                get
                {
                    return "Website";
                }
            }
            /// <summary>
            /// Get the name of column [LogoClub]
            /// </summary>
            public string LogoClub
            {
                get
                {
                    return "LogoClub";
                }
            }
            /// <summary>
            /// Get the name of column [ClotheImage]
            /// </summary>
            public string ClotheImage
            {
                get
                {
                    return "ClotheImage";
                }
            }
        }
        #endregion
    }
}
